3.359 \(\int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx\)

Optimal. Leaf size=237 \[ -\text {Int}\left ((a+b \sec (c+d x))^n,x\right )+\frac {\sqrt {2} (a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} F_1\left (\frac {1}{2};\frac {1}{2},-n-1;\frac {3}{2};\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1}}-\frac {\sqrt {2} a \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} F_1\left (\frac {1}{2};\frac {1}{2},-n;\frac {3}{2};\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt {\sec (c+d x)+1}} \]

[Out]

(a+b)*AppellF1(1/2,-1-n,1/2,3/2,b*(1-sec(d*x+c))/(a+b),1/2-1/2*sec(d*x+c))*(a+b*sec(d*x+c))^n*2^(1/2)*tan(d*x+
c)/b/d/(((a+b*sec(d*x+c))/(a+b))^n)/(1+sec(d*x+c))^(1/2)-a*AppellF1(1/2,-n,1/2,3/2,b*(1-sec(d*x+c))/(a+b),1/2-
1/2*sec(d*x+c))*(a+b*sec(d*x+c))^n*2^(1/2)*tan(d*x+c)/b/d/(((a+b*sec(d*x+c))/(a+b))^n)/(1+sec(d*x+c))^(1/2)-Un
integrable((a+b*sec(d*x+c))^n,x)

________________________________________________________________________________________

Rubi [A]  time = 0.33, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx \]

Verification is Not applicable to the result.

[In]

Int[(a + b*Sec[c + d*x])^n*Tan[c + d*x]^2,x]

[Out]

(Sqrt[2]*(a + b)*AppellF1[1/2, 1/2, -1 - n, 3/2, (1 - Sec[c + d*x])/2, (b*(1 - Sec[c + d*x]))/(a + b)]*(a + b*
Sec[c + d*x])^n*Tan[c + d*x])/(b*d*Sqrt[1 + Sec[c + d*x]]*((a + b*Sec[c + d*x])/(a + b))^n) - (Sqrt[2]*a*Appel
lF1[1/2, 1/2, -n, 3/2, (1 - Sec[c + d*x])/2, (b*(1 - Sec[c + d*x]))/(a + b)]*(a + b*Sec[c + d*x])^n*Tan[c + d*
x])/(b*d*Sqrt[1 + Sec[c + d*x]]*((a + b*Sec[c + d*x])/(a + b))^n) - Defer[Int][(a + b*Sec[c + d*x])^n, x]

Rubi steps

\begin {align*} \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx &=\int (a+b \sec (c+d x))^n \left (-1+\sec ^2(c+d x)\right ) \, dx\\ &=\frac {\int (-b-a \sec (c+d x)) (a+b \sec (c+d x))^n \, dx}{b}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^{1+n} \, dx}{b}\\ &=-\frac {a \int \sec (c+d x) (a+b \sec (c+d x))^n \, dx}{b}-\frac {\tan (c+d x) \operatorname {Subst}\left (\int \frac {(a+b x)^{1+n}}{\sqrt {1-x} \sqrt {1+x}} \, dx,x,\sec (c+d x)\right )}{b d \sqrt {1-\sec (c+d x)} \sqrt {1+\sec (c+d x)}}-\int (a+b \sec (c+d x))^n \, dx\\ &=\frac {(a \tan (c+d x)) \operatorname {Subst}\left (\int \frac {(a+b x)^n}{\sqrt {1-x} \sqrt {1+x}} \, dx,x,\sec (c+d x)\right )}{b d \sqrt {1-\sec (c+d x)} \sqrt {1+\sec (c+d x)}}+\frac {\left ((-a-b) (a+b \sec (c+d x))^n \left (-\frac {a+b \sec (c+d x)}{-a-b}\right )^{-n} \tan (c+d x)\right ) \operatorname {Subst}\left (\int \frac {\left (-\frac {a}{-a-b}-\frac {b x}{-a-b}\right )^{1+n}}{\sqrt {1-x} \sqrt {1+x}} \, dx,x,\sec (c+d x)\right )}{b d \sqrt {1-\sec (c+d x)} \sqrt {1+\sec (c+d x)}}-\int (a+b \sec (c+d x))^n \, dx\\ &=\frac {\sqrt {2} (a+b) F_1\left (\frac {1}{2};\frac {1}{2},-1-n;\frac {3}{2};\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \tan (c+d x)}{b d \sqrt {1+\sec (c+d x)}}+\frac {\left (a (a+b \sec (c+d x))^n \left (-\frac {a+b \sec (c+d x)}{-a-b}\right )^{-n} \tan (c+d x)\right ) \operatorname {Subst}\left (\int \frac {\left (-\frac {a}{-a-b}-\frac {b x}{-a-b}\right )^n}{\sqrt {1-x} \sqrt {1+x}} \, dx,x,\sec (c+d x)\right )}{b d \sqrt {1-\sec (c+d x)} \sqrt {1+\sec (c+d x)}}-\int (a+b \sec (c+d x))^n \, dx\\ &=\frac {\sqrt {2} (a+b) F_1\left (\frac {1}{2};\frac {1}{2},-1-n;\frac {3}{2};\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \tan (c+d x)}{b d \sqrt {1+\sec (c+d x)}}-\frac {\sqrt {2} a F_1\left (\frac {1}{2};\frac {1}{2},-n;\frac {3}{2};\frac {1}{2} (1-\sec (c+d x)),\frac {b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^n \left (\frac {a+b \sec (c+d x)}{a+b}\right )^{-n} \tan (c+d x)}{b d \sqrt {1+\sec (c+d x)}}-\int (a+b \sec (c+d x))^n \, dx\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 3.55, size = 0, normalized size = 0.00 \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[(a + b*Sec[c + d*x])^n*Tan[c + d*x]^2,x]

[Out]

Integrate[(a + b*Sec[c + d*x])^n*Tan[c + d*x]^2, x]

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{2}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x, algorithm="fricas")

[Out]

integral((b*sec(d*x + c) + a)^n*tan(d*x + c)^2, x)

________________________________________________________________________________________

giac [A]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x, algorithm="giac")

[Out]

integrate((b*sec(d*x + c) + a)^n*tan(d*x + c)^2, x)

________________________________________________________________________________________

maple [A]  time = 0.84, size = 0, normalized size = 0.00 \[ \int \left (a +b \sec \left (d x +c \right )\right )^{n} \left (\tan ^{2}\left (d x +c \right )\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x)

[Out]

int((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x)

________________________________________________________________________________________

maxima [A]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x, algorithm="maxima")

[Out]

integrate((b*sec(d*x + c) + a)^n*tan(d*x + c)^2, x)

________________________________________________________________________________________

mupad [A]  time = 0.00, size = -1, normalized size = -0.00 \[ \int {\mathrm {tan}\left (c+d\,x\right )}^2\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^2*(a + b/cos(c + d*x))^n,x)

[Out]

int(tan(c + d*x)^2*(a + b/cos(c + d*x))^n, x)

________________________________________________________________________________________

sympy [A]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right )^{n} \tan ^{2}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))**n*tan(d*x+c)**2,x)

[Out]

Integral((a + b*sec(c + d*x))**n*tan(c + d*x)**2, x)

________________________________________________________________________________________